<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let date = new Date();
        let year = date.getFullYear();
        let mouth = date.getMonth()+1;
        let day = date.getDate();
        let hour = date.getHours();
        let minutes = date.getMinutes();
        let second = date.getSeconds();
        // let dateStr = `${year}/${mouth.toString().padStart(2,"0")}/${day.toString().padStart(2,"0")}  ${hour.toString().padStart(2,"0")}:${minutes.toString().padStart(2,"0")}:${second.toString().padStart(2,"0")}`

        let dateStr = `${year}/${add0Fn(mouth)}/${add0Fn(day)}  ${add0Fn(hour)}:${add0Fn(minutes)}:${add0Fn(second)}`
        function add0Fn(num){
            return num.toString().padStart(2,"0")
        }
        console.log(dateStr)
    </script>
</body>
</html>